
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>资产借还记录</title>
    <link rel="stylesheet" href="../../layui/css/layui.css">
    <link rel="stylesheet" href="../../css/iconfont.css">
    <link rel="stylesheet" href="../../css/base.css">
    <script src="../../js/jquery-1.11.0.js"></script>
    <script src="../../layui/layui.js"></script>
    <script src="../../js/frameAll.js"></script>
    <style>
        .layui-form {
            margin-top: 30px;
        }
    </style>

</head>
<body>
<form class="layui-form" lay-filter="infoForm">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">名&emsp;&emsp;称 : </label>
            <div class="layui-input-inline shortInput">
                <input type="text" name="content" autocomplete="off" class="layui-input"
                       placeholder="请输入要查询的名称">
            </div>
        </div>
        <div class="layui-inline">
            <button class="layui-btn" lay-submit lay-filter="submitBut">查询</button>
        </div>
    </div>
</form>
<table id="info" lay-filter="back"></table>
<script>
    layui.use(['table', 'form'], function () {
        var table = layui.table,
            form = layui.form;
        //数据表格
        var tableIns = table.render({
            elem: '#info',
            height: 'full-128',
            url: '/fixedAsset/repair/page.do',
            cellMinWidth: '100',
            text: {
                none: 'QAQ没有查到数据，换个条件吧'
            },
            request: {
                pageName: 'pageNo',
                limitName: 'pageSize'
            },
            page: true,
            cols: [[
                {title: '序号', type: 'numbers', width: 80},
                {title: '资产名称', unresize: true, templet: function (res) {
                        return res.zc.zcName;
                    }},
                {field: 'sendTime', title: '送修时间', unresize: true},
                {field: 'sender', title: '送修人', unresize: true},
                {field: 'loginUser', title: '经手人', unresize: true},
                {field: 'reason', title: '送修原因', unresize: true},
                {field: 'wxTime', title: '维修时间', unresize: true},
                {field: 'wxResult', title: '维修结果', unresize: true},
                {field: 'cost', title: '花费金额', unresize: true},
                {field: 'wxComment', title: '维修备注', unresize: true},

            ]],
            error: function () {
                top.location.href = "../../login.html";
            },
            done: function (res) {
                if (res.message) {
                    noMsg(res.message);
                }
            },
        });
        //查询指定条件的用户
        form.on('submit(submitBut)', function (data) {
            var field = data.field;
            info.content = field.content;
            tableIns.reload({
                page: {curr: 1}
            });
            return false;
        });
    });
</script>
</body>
</html>